home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / 386p_200.zip / EXAMPLES.TXT < prev    next >
Text File  |  1995-01-15  |  8KB  |  162 lines

  1. Here follows the description of some of my test code
  2. (very crude, these are quick and dirty examples i use to debug things)
  3.  
  4. Under Windows , run these programs FULL SCREEN in exclusive mode
  5. (i've included some Windows 3.1 PIF files to show you how to set 'em
  6.  use the Windows PIF editor to look into them).
  7. Assembling these programs you will need at least 256k of free low memory
  8. and 128k of free extended memory, if you have not, try to reduce
  9. the EXTMIN and LOWMIN constants declared into 386Power.inc
  10. (the minimum value for EXTMIN must be 64)
  11.  
  12. To compile these you'll need Borland's TASM and MAKE utilities
  13. or equivalent programs (if you use MASM you will have to change
  14. some makefile options and syntax)
  15.  
  16. To run EXAMPLE0 remember to set text mode to 80x25
  17. Yeah! 386P initializes in mode 03h, that usually is 80x25
  18. but on some sistems it can be set to different values
  19. and the "raw" text i/o code into example0 was coded
  20. to deal with 80x25. 
  21. Of course startup & shutdown messages are not affected
  22. (they use bios calls).
  23.  
  24. EXAMPLE0.ASM
  25.         Create it typing:
  26.                 make example0
  27.                 
  28.         It tries to "get up" (386P check)
  29.         detecting system type (VCPI,DPMI,XMS,HARD)
  30.         and cpu type (386,486,Pentium or "successive")
  31.         then reads the file hello.txt
  32.         and writes it to screen in text mode.
  33.         Sees if there are arguments on the command line & then
  34.         displays them if present.
  35.         Then shows an example of "raw" keyboard
  36.         handling (press & release keys to see what key you pressed).
  37.         The _RKB table is cleared at every keypress.
  38.         Pressing ESC you terminate the program.
  39.         First execute it as:
  40.         example0
  41.         Then try to run it with the following options to see how
  42.         command line parameters are read:
  43.         example0 -THESE these -ARE are -OPTIONS filenames
  44.         example0 hocus.pocus -FOOBAR 638398 -657 good*day inter*.zip -OK
  45.         
  46. TED.ASM
  47.         Assemble with:
  48.              make ted
  49.         Execute typing:
  50.                 ted
  51.         This is a simple "Tiled background EDitor".
  52.         It reads the CHARSET.CBF font file and the TILES.TBF tile file
  53.         and lets you edit a .TMF file or create a new one.
  54.         When it starts, it loads a PCX "program name image"
  55.         then when you press any key
  56.         it "opens" a menu demo with one active submenu
  57.         (look in the submenu to see if the current XVD.XVD driver
  58.          has been loaded and if it has been properly installed)
  59.         (see the "flags" for driver found, bios check, hardware check
  60.          and mode initialized) (n.b. those flags can be modified by you
  61.          within the menu, but this has no effects on the program)
  62.         (by the way, TED.ASM is useful when you have to test
  63.          the xvd driver you devenloped and want to see where it fails)
  64.         ( up/down arrows to change menu entry
  65.           left/right to decrese/increse values
  66.           ENTER for "direct input" )
  67.         Pressing ESC or selecting the first entry you get into the
  68.         "tile map editor" (sort of)
  69.         Notice the menu entries can be "fully programmed" with bound
  70.         checking and "automatic correction", what's more, multiple
  71.         input methods are possible for numeric values.
  72.  
  73.  
  74.         The numbers in the lower window are:
  75.         FRAME_RATE   TIME_COUNT_FROM_PROGRAM_START (truncated to 32bit)
  76.         MOUSE_X      MOUSE_Y
  77.         There is also a "horizontal position" indicator
  78.         (a black line with a white point "stretching" it
  79.          and then "moving inside it") this because the "virtual screen"
  80.          is TEN TIMES the screen width (and "only" TWO times the screen
  81.          height).
  82.  
  83.         esc   = exit from program
  84.         <- -> = (left/right cursor) change "selected" tile
  85.         F2 F3 = load/save tile file
  86.         mouse click = write "selected" tile
  87.                       (the leftmost one on the tile scrollbar)
  88.  
  89.         Move the cursor "hand" to the screen borders to scroll around.
  90.         Your initial position is the top-left "virtual screen" border.
  91.         THIS PROGRAM WILL USE THE DEFAULT XSD DRIVER (XSD.XSD)
  92.         IF PRESENT (i've included a driver for my chips&tech 450 vga card)
  93.         AND THE HARDWARE CHECK IS OK
  94.         else is the driver is not present or the install check fails
  95.         it will use the "integral" mode 13h driver.
  96.         (with an xsd driver capable to drive directly your card you totally
  97.          eliminate flicker and get better looking scrolling).
  98.         When you "move the mouse" without scrolling the "delta blitting"
  99.         (_PageFlip1)
  100.         method is used, while when you "click" or scroll around
  101.         the "brute force blit-everything" (_PageFlip0) method is used
  102.         THIS WAY YOU CAN QUICKLY SEE THE "difference" BETWEEN ONE METHOD
  103.         AND THE OTHER.
  104.  
  105.         N.B. The current "delta blitting" method is the SIMPLEST USEFUL
  106.              delta blitting method.
  107.              Knowing what you want from your program
  108.              you can "customize" the delta blitting strategy
  109.              and use it for scrolling too!
  110.              (a GENERIC "delta blit" method cannot take advantage
  111.               of the things you know the program will do
  112.               so you cannot optimize it to get fast scrolling, that's why
  113.               i simply used a "brute force" method to blit the screen
  114.               image when scrolling)
  115.              [Heck! I need to keep some "secrets" to get an edge!]
  116.              [But i gave you enough hints to let you code an
  117.               "improved" delta-blit routine] [See the docs and the source
  118.               code].
  119.         
  120. JOY.ASM
  121.         Make it with:
  122.                 make joy
  123.         A sample program showing you how to calibrate the joystick
  124.         and use the 386joy.asm module.
  125.         It uses XSD.XSD too!
  126.  
  127. VGAREG.ASM
  128.         Make it with:
  129.                 make vgareg.asm
  130.         This program simply gets in protected mode and then
  131.         tries to read the values of VGA/SVGA internal registers
  132.         then it writes the values into vgareg.tbl
  133.         this is useful when you want to see what are the internal register values
  134.         to make an enhanced video driver for your card.
  135.  
  136. PCX2TBF.ASM
  137.         Make it with:
  138.                 make pcx2tbf
  139.         This program accepts two file names from the command line
  140.         the first file must be a .PCX 320x200 256 colors image
  141.         the second is the destination files (usually a .TBF one).
  142.         The pcx file is subdivided into a "matrix"
  143.         of 10*7 "patterns" 32x24 pixel each
  144.         and then the patterns are stored sequentially into the .TBF file.
  145.         (you can use the TBF files to edit tiled maps with TED)
  146.         If you want to make TBF files with more than 70 patterns
  147.         simple "join" (using the copy command with the "+" parameters
  148.         and the "/B" switches) the TBF files produced by PCX2TBF
  149.         into a single TBF file.
  150.  
  151. PCX2CBF.ASM
  152.         Make it with:
  153.                 make pcx2cbf
  154.         This is the "character bitmap" converter
  155.         it works in a way similar to PCX2TBF but generates
  156.         256 8x8 patterns the CHARIO.ASM module uses to draw characters.
  157.         It also estracts the "character palette" entries
  158.         so when you load a character set it will always "start"
  159.         with its default color palette.
  160.         (SEE FILEFMTS.TXT FOR MORE INFO)
  161.  
  162.